﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="Microsoft.ProductivityHub.SilverlightBookshelf.MyFavoritesControl"
	d:DesignWidth="475" d:DesignHeight="330">

	<Grid x:Name="LayoutRoot" Margin="16,0,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
		<Grid x:Name="TitleGrid" Margin="0,10,0,0" Grid.Row="0" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
			<TextBlock Margin="0" FontSize="21.333" Foreground="{Binding Path=DarkColorBrush, Mode=OneWay, Source={StaticResource HubColorsDataSource}}" Text="My Favorites" VerticalAlignment="Center" TextWrapping="NoWrap"/>
			<Image HorizontalAlignment="Left" Margin="10" Width="25" Source="../Images/hub-myfavorties1.png" VerticalAlignment="Center"  Grid.Column="1" Stretch="None"/>
		</Grid>
        <ScrollViewer x:Name="scrollView" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Auto" MouseWheel="ScrollViewer_MouseWheel" 
                      Grid.Row="1" Height="280" BorderBrush="Transparent" Background="#01FFFFFF" Margin="0,0,10,0">
            
		<ItemsControl x:Name="favoritesContentControl">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid Grid.Row="0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <TextBlock Cursor="Hand" FontSize="12" Foreground="{Binding Path=LinkColorBrush, Mode=OneWay, Source={StaticResource HubColorsDataSource}}" 
                                           Text="{Binding Title}" TextWrapping="Wrap" Grid.Column="0" 
                                           FontFamily="Verdana" VerticalAlignment="Center" HorizontalAlignment="Left" MaxWidth="400" 
                                           MouseLeftButtonDown="Title_MouseLeftButtonDown" Tag="{Binding DocUrl}"/>
                                <TextBlock FontSize="10" Cursor="Hand" Foreground="#FF666666" Text="(X Remove)" TextWrapping="NoWrap" Grid.Column="1" 
                                           FontFamily="Verdana" Margin="5" MouseLeftButtonDown="RemoveFavorite_MouseLeftButtonDown" Tag="{Binding DocUrl}"/>
                            </Grid>
                            <Grid Grid.Row="1">
                                <Line Fill="#FFCCCCCC" HorizontalAlignment="Left" VerticalAlignment="Center" Stroke="#FFCCCCCC" StrokeThickness="1" X2="460"></Line>
                            </Grid>

                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>

        </ScrollViewer>
	</Grid>
</UserControl>